package cn.wolfcode.wolf2w.domain;

import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

/**
 * 攻略
 */

@Document("strategy")
public class Strategy extends BaseDomain {
    public static final int  ABROAD_NO = 0;  //国内
    public static final int  ABROAD_YES = 1;  //国外

    public static final int STATE_NORMAL = 0;  //带发布
    public static final int STATE_PUBLISH = 1; //发布

    private String destId;  //关联的目的地
    private String destName;

    private String themeId; //关联主题
    private String themeName;

    private String catalogId;  //关联的分类
    private String catalogName;

    private String title;  //标题

    private String subTitle; //副标题

    private String summary;  //内容摘要

    private String coverUrl;  //封面

    private Date createTime;  //创建时间

    private int isabroad = ABROAD_NO;  //是否是国外

    private int viewnum;  //点击数

    private int replynum;  //攻略评论数

    private int favornum; //收藏数

    private int sharenum; //分享数

    private int thumbsupnum; //点赞个数

    private int state = STATE_NORMAL;  //状态

    private String content; //攻略内容

    public String getStateDisplay(){
        return state == STATE_PUBLISH ? "发布" :"待发布";
    }

    public static int getAbroadNo() {
        return ABROAD_NO;
    }

    public static int getAbroadYes() {
        return ABROAD_YES;
    }

    public static int getStateNormal() {
        return STATE_NORMAL;
    }

    public static int getStatePublish() {
        return STATE_PUBLISH;
    }

    public String getDestId() {
        return destId;
    }

    public void setDestId(String destId) {
        this.destId=destId;
    }

    public String getDestName() {
        return destName;
    }

    public void setDestName(String destName) {
        this.destName=destName;
    }

    public String getThemeId() {
        return themeId;
    }

    public void setThemeId(String themeId) {
        this.themeId=themeId;
    }

    public String getThemeName() {
        return themeName;
    }

    public void setThemeName(String themeName) {
        this.themeName=themeName;
    }

    public String getCatalogId() {
        return catalogId;
    }

    public void setCatalogId(String catalogId) {
        this.catalogId=catalogId;
    }

    public String getCatalogName() {
        return catalogName;
    }

    public void setCatalogName(String catalogName) {
        this.catalogName=catalogName;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title=title;
    }

    public String getSubTitle() {
        return subTitle;
    }

    public void setSubTitle(String subTitle) {
        this.subTitle=subTitle;
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary=summary;
    }

    public String getCoverUrl() {
        return coverUrl;
    }

    public void setCoverUrl(String coverUrl) {
        this.coverUrl=coverUrl;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime=createTime;
    }

    public int getIsabroad() {
        return isabroad;
    }

    public void setIsabroad(int isabroad) {
        this.isabroad=isabroad;
    }

    public int getViewnum() {
        return viewnum;
    }

    public void setViewnum(int viewnum) {
        this.viewnum=viewnum;
    }

    public int getReplynum() {
        return replynum;
    }

    public void setReplynum(int replynum) {
        this.replynum=replynum;
    }

    public int getFavornum() {
        return favornum;
    }

    public void setFavornum(int favornum) {
        this.favornum=favornum;
    }

    public int getSharenum() {
        return sharenum;
    }

    public void setSharenum(int sharenum) {
        this.sharenum=sharenum;
    }

    public int getThumbsupnum() {
        return thumbsupnum;
    }

    public void setThumbsupnum(int thumbsupnum) {
        this.thumbsupnum=thumbsupnum;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state=state;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content=content;
    }

    @Override
    public String toString() {
        return "Strategy{" + "destId='" + destId + '\'' + ", destName='" + destName + '\'' + ", themeId='" + themeId + '\'' + ", themeName='" + themeName + '\'' + ", catalogId='" + catalogId + '\'' + ", catalogName='" + catalogName + '\'' + ", title='" + title + '\'' + ", subTitle='" + subTitle + '\'' + ", summary='" + summary + '\'' + ", coverUrl='" + coverUrl + '\'' + ", createTime=" + createTime + ", isabroad=" + isabroad + ", viewnum=" + viewnum + ", replynum=" + replynum + ", favornum=" + favornum + ", sharenum=" + sharenum + ", thumbsupnum=" + thumbsupnum + ", state=" + state + ", content='" + content + '\'' + '}';
    }
}